﻿export default [
  {
    path: '/user',
    layout: false,
    key: 'user',
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/Login',
        key: 'userLogin',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/admin/home',
    name: '首页',
    icon: 'smile',
    key: 'home',
    flatMenu: true,
    component: './home',
    layout: false,
  },
  {
    path: '/admin',
    name: '系统管理',
    key: 'admin',
    flatMenu: true,
    component: './../layouts/BaseLayout',
    routes: [
      {
        path: '/admin/api',
        name: '系统管理',
        icon: 'smile',
        key: 'api',
        routes: [
          {
            path: '/admin/api/APITAG',
            name: 'API标签管理',
            component: './api/APITAG',
            key: 'APITAG',
          },
          {
            path: '/admin/api/APIman',
            name: 'Api管理',
            component: './api/APIman',
            key: 'APIman',
          },
        ],
      },
    ],
  },
];

// let arr = [];
// let newarr = [];
// arr[0].children.map((e) => {
//   newarr.push({
//     path: '/admin/business/' + e.href,
//     name: e.name,
//     icon: 'smile',
//     access: 'normalRouteFilter',
//     component: './gptChats',
//     key: e.href,
//   });
// });
